<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 用css样式编写html文本结构 */

        /* 前 */
        .p1::before{
         content: '金';
         color: aqua;
         font-size: 20px;
        }
        /* 后 */
        .p2::after{
         content: '金';
         color: antiquewhite;
         font-size: 20px;
        }
        .box1{
         width: 200px;
         height: 200px;
         background-color: rgb(173, 53, 53);
         text-align: center;
         float: left;
        }
        .box2{
         width: 200px;
         height: 200px;
         background-color: rgb(53, 173, 75);
         text-align: center;
         float: right;
        }
        
    </style>
</head>
<body>
 <div class="box1"><p class="p1">前</p></div>
 <div class="box2"><p class="p2">后</p></div>
</body>
</html>